package com.ccbooks.listener;

import com.ccbooks.view.BookContentView;

import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;

public class BtnLightClick implements OnClickListener{
	// 所有控件；
	private BookContentView bcv;

	
	private LinearLayout btnLightEnter; //亮度调节悬浮框；
	private LinearLayout btnFontEnter; // 字体调节悬浮框；
	public BtnLightClick(BookContentView bcv, LinearLayout btnLightEnter, LinearLayout btnFontEnter,
			short showLightEnter) {
		super();
		this.bcv = bcv;
		this.btnLightEnter = btnLightEnter;
		this.btnFontEnter = btnFontEnter;
		bcv.showLightEnter = showLightEnter;
	}

	// 点击亮度按钮；
	
		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			
		switch (bcv.showLightEnter) {
			 case 1 : 
				 	btnLightEnter.setVisibility(View.VISIBLE);
					btnFontEnter.setVisibility(View.GONE);
			bcv.showLightEnter = 2;
					break; 
			 case 2 : 
				 	btnLightEnter.setVisibility(View.GONE);
					btnFontEnter.setVisibility(View.GONE);
			bcv.showLightEnter = 1;
					break; 
			 case 3 : 
					break; 
			 default : 
				 	break; 
			}

		}	
}
